﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vGridSet
	/// </summary>
	[Serializable]
	public class vGridSet : Entity 
	{ 
		 public vGridSet() 
            : base("vGridSet") 
        { 

        }


		#region Model
		private int _UID;
		private string _Code;
		private string _Name;
		private int? _GridID;
		private string _FieldName;
		private string _FieldType;
		private string _FieldFormat;
		private int? _Width;
		private string _FooterType;
		private string _FooterFormat;
		private bool? _IsVisible;
		private bool? _IsEditing;
		private bool? _IsFocusing;
		private int? _SeqNo;
		private bool? _IsDisable;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
		private string _Grid;
		private string _Form;
		private int? _FormID;
		private string _UserCreate;
		private string _UserModify;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Code
		{
			get{ return _Code; }
			set
			{
				this.OnPropertyValueChange(_.Code,_Code,value);
				this._Code = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Name
		{
			get{ return _Name; }
			set
			{
				this.OnPropertyValueChange(_.Name,_Name,value);
				this._Name = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? GridID
		{
			get{ return _GridID; }
			set
			{
				this.OnPropertyValueChange(_.GridID,_GridID,value);
				this._GridID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FieldName
		{
			get{ return _FieldName; }
			set
			{
				this.OnPropertyValueChange(_.FieldName,_FieldName,value);
				this._FieldName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FieldType
		{
			get{ return _FieldType; }
			set
			{
				this.OnPropertyValueChange(_.FieldType,_FieldType,value);
				this._FieldType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FieldFormat
		{
			get{ return _FieldFormat; }
			set
			{
				this.OnPropertyValueChange(_.FieldFormat,_FieldFormat,value);
				this._FieldFormat = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? Width
		{
			get{ return _Width; }
			set
			{
				this.OnPropertyValueChange(_.Width,_Width,value);
				this._Width = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FooterType
		{
			get{ return _FooterType; }
			set
			{
				this.OnPropertyValueChange(_.FooterType,_FooterType,value);
				this._FooterType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FooterFormat
		{
			get{ return _FooterFormat; }
			set
			{
				this.OnPropertyValueChange(_.FooterFormat,_FooterFormat,value);
				this._FooterFormat = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsVisible
		{
			get{ return _IsVisible; }
			set
			{
				this.OnPropertyValueChange(_.IsVisible,_IsVisible,value);
				this._IsVisible = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsEditing
		{
			get{ return _IsEditing; }
			set
			{
				this.OnPropertyValueChange(_.IsEditing,_IsEditing,value);
				this._IsEditing = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsFocusing
		{
			get{ return _IsFocusing; }
			set
			{
				this.OnPropertyValueChange(_.IsFocusing,_IsFocusing,value);
				this._IsFocusing = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? SeqNo
		{
			get{ return _SeqNo; }
			set
			{
				this.OnPropertyValueChange(_.SeqNo,_SeqNo,value);
				this._SeqNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsDisable
		{
			get{ return _IsDisable; }
			set
			{
				this.OnPropertyValueChange(_.IsDisable,_IsDisable,value);
				this._IsDisable = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Grid
		{
			get{ return _Grid; }
			set
			{
				this.OnPropertyValueChange(_.Grid,_Grid,value);
				this._Grid = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Form
		{
			get{ return _Form; }
			set
			{
				this.OnPropertyValueChange(_.Form,_Form,value);
				this._Form = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? FormID
		{
			get{ return _FormID; }
			set
			{
				this.OnPropertyValueChange(_.FormID,_FormID,value);
				this._FormID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCreate
		{
			get{ return _UserCreate; }
			set
			{
				this.OnPropertyValueChange(_.UserCreate,_UserCreate,value);
				this._UserCreate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserModify
		{
			get{ return _UserModify; }
			set
			{
				this.OnPropertyValueChange(_.UserModify,_UserModify,value);
				this._UserModify = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.Code,
				_.Name,
				_.GridID,
				_.FieldName,
				_.FieldType,
				_.FieldFormat,
				_.Width,
				_.FooterType,
				_.FooterFormat,
				_.IsVisible,
				_.IsEditing,
				_.IsFocusing,
				_.SeqNo,
				_.IsDisable,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate,
				_.Grid,
				_.Form,
				_.FormID,
				_.UserCreate,
				_.UserModify
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_Code,
				_Name,
				_GridID,
				_FieldName,
				_FieldType,
				_FieldFormat,
				_Width,
				_FooterType,
				_FooterFormat,
				_IsVisible,
				_IsEditing,
				_IsFocusing,
				_SeqNo,
				_IsDisable,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate,
				_Grid,
				_Form,
				_FormID,
				_UserCreate,
				_UserModify
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "Code":
                    this._Code = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Name":
                    this._Name = DataHelper.ConvertValue<string>(value);
                    break; 
				case "GridID":
                    this._GridID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "FieldName":
                    this._FieldName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FieldType":
                    this._FieldType = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FieldFormat":
                    this._FieldFormat = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Width":
                    this._Width = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "FooterType":
                    this._FooterType = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FooterFormat":
                    this._FooterFormat = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsVisible":
                    this._IsVisible = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsEditing":
                    this._IsEditing = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsFocusing":
                    this._IsFocusing = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "SeqNo":
                    this._SeqNo = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "IsDisable":
                    this._IsDisable = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Grid":
                    this._Grid = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Form":
                    this._Form = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FormID":
                    this._FormID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "UserCreate":
                    this._UserCreate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModify":
                    this._UserModify = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "Code":
                    return this._Code; 
				case "Name":
                    return this._Name; 
				case "GridID":
                    return this._GridID; 
				case "FieldName":
                    return this._FieldName; 
				case "FieldType":
                    return this._FieldType; 
				case "FieldFormat":
                    return this._FieldFormat; 
				case "Width":
                    return this._Width; 
				case "FooterType":
                    return this._FooterType; 
				case "FooterFormat":
                    return this._FooterFormat; 
				case "IsVisible":
                    return this._IsVisible; 
				case "IsEditing":
                    return this._IsEditing; 
				case "IsFocusing":
                    return this._IsFocusing; 
				case "SeqNo":
                    return this._SeqNo; 
				case "IsDisable":
                    return this._IsDisable; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				case "Grid":
                    return this._Grid; 
				case "Form":
                    return this._Form; 
				case "FormID":
                    return this._FormID; 
				case "UserCreate":
                    return this._UserCreate; 
				case "UserModify":
                    return this._UserModify; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vGridSet");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vGridSet","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Code = new Field("Code","vGridSet","Code");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Name = new Field("Name","vGridSet","Name");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GridID = new Field("GridID","vGridSet","GridID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FieldName = new Field("FieldName","vGridSet","FieldName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FieldType = new Field("FieldType","vGridSet","FieldType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FieldFormat = new Field("FieldFormat","vGridSet","FieldFormat");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Width = new Field("Width","vGridSet","Width");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FooterType = new Field("FooterType","vGridSet","FooterType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FooterFormat = new Field("FooterFormat","vGridSet","FooterFormat");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsVisible = new Field("IsVisible","vGridSet","IsVisible");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsEditing = new Field("IsEditing","vGridSet","IsEditing");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsFocusing = new Field("IsFocusing","vGridSet","IsFocusing");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SeqNo = new Field("SeqNo","vGridSet","SeqNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDisable = new Field("IsDisable","vGridSet","IsDisable");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","vGridSet","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vGridSet","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vGridSet","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vGridSet","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","vGridSet","ModifyDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Grid = new Field("Grid","vGridSet","Grid");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Form = new Field("Form","vGridSet","Form");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FormID = new Field("FormID","vGridSet","FormID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreate = new Field("UserCreate","vGridSet","UserCreate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModify = new Field("UserModify","vGridSet","UserModify");
		}
		#endregion

 
	}
}

